/**
 * Created by baoman on 2017/4/11.
 */
angular.module(moduleName + '.controllers')
	.controller('productPurchaseInfoCtrl', function($rootScope, $scope, $state) {
		var productPurchaseInfo = this;

		// 获取所选客户
		$rootScope.$on('send-result', function(event, data) {
			var user = data.result;
			productPurchaseInfo.user = {};
			if (user) {
				productPurchaseInfo.preName = user.name;
				productPurchaseInfo.prePhone = user.phone;
				productPurchaseInfo.user.name = user.name;
				productPurchaseInfo.user.phone = user.phone;
				productPurchaseInfo.user.selected = user.selected;
			}

		});

	});